package com.zy.dp.visitor.example1;

import java.util.ArrayList;
import java.util.Collection;

public class ObjectStructure
{
	private Collection<Element> col = new ArrayList<Element>();

	public void handleRequest(Visitor visitor)
	{

		for (Element ele : col)
		{
			ele.accept(visitor);
		}
	}

	public void addElement(Element ele)
	{
		this.col.add(ele);
	}
}
